[C#] Async threaded tcp server

Posted by mark_dj on Stack Overflow See other posts from Stack Overflow or by mark_dj
Published on 2010-03-30T21:20:31Z Indexed on 2010/03/30 21:23 UTC
Read the original article Hit count: 315

Filed under:
|
|
|
|

I want to create a high performance server in C# which could take about ~10k clients. Now i started writing a TcpServer with C# and for each client-connection i open a new thread. I also use one thread to accept the connections. So far so good, works fine.

The server has to deserialize AMF incoming objects do some logic ( like saving the position of a player ) and send some object back ( serializing objects ). I am not worried about the serializing/deserializing part atm.

My main concern is that I will have a lot of threads with 10k clients and i've read somewhere that an OS can only hold like a few hunderd threads.

Are there any sources/articles available on writing a decent async threaded server ? Are there other possibilties or will 10k threads work fine ? I've looked on google, but i couldn't find much info about design patterns or ways which explain it clearly

© Stack Overflow or respective owner

Related posts about c#

Related posts about amf